<!DOCTYPE html>
<html lang="es">
{% load staticfiles %}
  <head>
    <meta charset="utf-8" />
    <title>Inicio de sesión</title>
    <link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" media="all" rel="stylesheet">
    <link href="https://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" media="all" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.0/animate.min.css" media="all" rel="stylesheet">  
    <link href="http://fonts.googleapis.com/css?family=Raleway:300,500" rel="stylesheet" type="text/css">
    <link href="static/LoginThings/css/styles.css" media="all" rel="stylesheet">
	<link href="{% static 'LoginThings/css/styles.css' %}" media="all" rel="stylesheet">
     <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.1/modernizr.min.js"></script>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">

  </head>

  <script>

	  function cambiarEstilo(){

	  		document.getElementById("form").className = "form animate-form animated shake invalid";

	  }

  </script>

  <body id="divRegistro">  

      <div class="wrapper">

	      <div class="form-header">
	        <div class="fa fa-rocket"></div>
	        <h1>eFilms</h1>
	      </div>



			<form id ="form" class="form animate-form"  method="post" action="{% url 'django.contrib.auth.views.login' %}">

				{% block content %}
					{% if form.errors %}
		  				<script>cambiarEstilo();</script>
					{% endif %}



				{% csrf_token %}


				<div class="form-group has-feedback">
						  <label class="control-label sr-only" for="username"></label>
						  <div class="input-group-addon">
							<div class="glyphicon glyphicon-user"></div>
						  </div>
							<input class="form-control" id="id_username" maxlength="254" name = "username" type="text" placeholder="Nombre de Usuario">
						  <span class="glyphicon glyphicon-ok form-control-feedback"></span>
				</div>

				<div class="form-group has-feedback">
						  <label class="control-label sr-only" for="password"></label>
						  <div class="input-group-addon">
							<div class="glyphicon glyphicon-lock"></div>
						  </div>
							<input class="form-control" id="id_password" maxlength="254" name = "password" type="password" placeholder="Contraseña">
						  <span class="glyphicon glyphicon-ok form-control-feedback"></span>
						</div>

				<div class="form-group submit">
					<input class="btn btn-lg" type="submit" value="Acceder"/> <input type="hidden" name="next" value="{{ next }}"/>
				</div>
			</form>

		{% endblock %}


	</div>


    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="static/loginThings/js/jquery.validation.js"></script>
    <script src="static/loginThings/js/messages_es.js"></script>
    <script src="static/loginThings/js/main.js"></script>
	<script src="{% static 'LoginThings/js/jquery.validation.js' %}"></script>
    <script src="{% static 'LoginThings/js/messages_es.js' %}"></script>
    <script src="{% static 'LoginThings/js/main.js' %}"></script>
  </body>
</html>